/**
 * 用户表单
 */
import { ref } from 'vue'
import { FormItemProps } from '../../../components/base/form-item/props/index'
import { user } from '../../../entity/system/user'
import { Notice } from '@/entity/system/notice'
export const formItems = ref<Array<FormItemProps<Notice>>>([
  {
    type: 'input',
    name: 'title',
    label: '标题',
    placeholder: '请输入标题',
    required: true,
  },
  {
    type: 'editor',
    name: 'content',
    label: '内容',
    required: true,
    placeholder: '请输入内容',
  },
  {
    type: 'upload',
    name: 'cover',
    label: '封面',
    placeholder: '封面',
  },
  {
    type: 'select',
    name: 'noticeRange',
    placeholder: '请选择范围',
    label: '范围',
    params: {
      options: [
        {
          label: '全部',
          value: 1,
        },
        {
          label: '个人 ',
          value: 2,
        },
        {
          label: '所有部门',
          value: 3,
        },
        {
          label: '指定部门',
          value: 4,
        },
      ],
      allowClear: true,
    },
  },
  {
    type: 'transfer',
    name: 'ranges',
    placeholder: '请选择指定范围',
    label: '指定范围',
    params: {
      allowClear: true,
      showSearch: true,
      dataSource: [],
      render: (item) => item.title,
    },
  },
  {
    type: 'upload',
    name: 'attachment',
    label: '附件',
    placeholder: '附件',
    params: {
      maxCount: 9,
      accept: '*',
    },
  },
  {
    type: 'select',
    name: 'status',
    placeholder: '请选择状态',
    label: '状态',
    disabled: true,
    params: {
      options: [
        {
          label: '暂存',
          value: 1,
        },
        {
          label: '发布',
          value: 2,
        },
        {
          label: '禁用',
          value: 3,
        },
      ],
      allowClear: true,
    },
  },
  {
    type: 'select',
    name: 'type',
    placeholder: '请选择通知类型',
    label: '通知类型',

    params: {
      options: [
        {
          label: '轮播图',
          value: 1,
        },
        {
          label: '公告',
          value: 2,
        },
      ],
      allowClear: true,
    },
  },
])
